package com.hzg.springcloud.service.impl;

/**
 * @ Description: TODO
 * @ Author: 卓哥
 * @ Date: 2020/8/28 11:42
 * @ Version: 1.0
 */

import com.hzg.springcloud.domain.Product;
import com.hzg.springcloud.mapper.ProductMapper;
import com.hzg.springcloud.service.IProductService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
@Slf4j
public class ProductServiceImpl implements IProductService {
    @Autowired
    private ProductMapper productMapper;
    @Override
    public void save(Product product) {
        productMapper.save(product);
    }
    @Override
    public Product get(Long id) {
        //System.out.println("ProductServiceImpl...get...");
        log.info("ProductServiceImpl...get...");
        return productMapper.get(id);
    }
}
